<script language='javascript' type='text/javascript' src="<?=base_url('users')?>scripts/user.js"></script>
<?if(get_flash_message()){?><center><div class="messageBox"><?=get_flash_message()?></div></center><?}?>
<form method="post" action="<?=site_url('admin/users.users.delete_all')?>" name="frm_users" id="frm_users">
<input type="hidden" name="act" id="act" value="delete_all" />
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="text">
  <tr align="center" id="listTableHeader"> 
    <td width="10"><input type="checkbox" onclick="common.mark_all_rows('uid[]', this.checked)" /></td>
    <td width="20%">{UsernameTX}</td>
    <td width="20%">{FullnameTX}</td>
    <td width="20%">{EmailTX}</td>
    <td width="15%">{LastLoginTX}</td>
    <td width="50">{EnableTX}</td>
    <td><nobr>Role Name</nobr></td>
    <td width="60"><nobr>Action</nobr></td>
  </tr>
<?$i=1;foreach($users as $user){?>
  <tr class="row<?=($i==1)?'1':'2'?>">
    <td><input type="checkbox" name="uid[]" value="<?=$user->id?>" /></td>
    <td><?=h($user->username)?></td>
    <td><?=h($user->fullname)?></td>
    <td><?=h($user->email)?></td>
    <td align="center"><?=mysql_to_fulldate($user->last_login)?></td>
    <td align="center"><a href="#" onclick="common.switch_status('<?=site_url('admin_ajax/users.users.switch_status/'.$user->id)?>', 'div_status_<?=$user->id?>');"><div id="div_status_<?=$user->id?>" class="<?=($user->enable)?'active_icon':'inactive_icon'?>"></div></a></td>
    <td><?=h($user->role_name)?></td>
    <td>
        <a href="<?=site_url('admin/users.users.edit/'.$user->id)?>"><div class="edit_icon">|</div></a>
        <a href="javascript:void(0);" onclick="user.del(<?=$user->id?>)"><div class="delete_icon"></div></a>
    </td>
  <tr>
<?$i=-$i;}?>
  <tr>
    <td colspan="8">
      <table class="adminlist" border="0" cellpadding="0" cellpadding="0" width="100%" class="PagingTable">
        <tr>
          <td class="pageCounter" width="100%" align="center">
            {paging}
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</form>
